home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / Implementation / Binding / Binding.r next >
Encoding:
Text File  |  1997-02-13  |  7.1 KB  |  320 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Binding.r
  3.  
  4.     Contains:    Alert dialog resources for Binding
  5.  
  6.     Owned by:    Reginald Adkins
  7.  
  8.     Copyright:    © 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <6>     9/17/96    RA        1370339: NoPart should be replacable by
  13.                                     third parties, added NoPart nmaps
  14.          <5>     6/27/96    jpa        1361886: Added NoPart error message table &
  15.                                     alerts. Moved some rsrcs to new NoPart.res.
  16.          <4>     6/27/96    RA        1361408: Added null viewer part handler
  17.                                     viewer nmap
  18.          <3>     3/15/96    RA        #1302213: New Editor Substituion dialog was
  19.                                     misleading.
  20.          <2>      1/8/96    CG        1299331 1.0.1: Replaced DITL with STR for
  21.                                     change to notification manager.
  22.  
  23.     To Do:
  24.         
  25. */
  26.  
  27.  
  28. #define SystemSevenOrBetter 1            // we want the extended types
  29. #define    SystemSevenOrLater    1            // Types.r uses this variable
  30.  
  31. #ifndef __TYPES_R__
  32. #include "Types.r"
  33. #endif
  34.  
  35. #ifndef __ODTYPES_R__
  36. #include "ODTypes.r"
  37. #endif
  38.  
  39. #ifndef SOM_Module_OpenDoc_Errors_defined
  40. #include "ErrorDef.r"
  41. #endif
  42.  
  43. #ifndef _CONSTDEF_
  44. #include "ConstDef.h"
  45. #endif
  46.  
  47. #ifndef _BNDNGDEF_
  48. #include "BndngDef.h"
  49. #endif
  50.  
  51. //==============================================================================
  52. // Editor Substitution Warning
  53. //==============================================================================
  54.  
  55.  
  56. resource 'STR ' (kBindingWarning, purgeable)
  57. {
  58.     "One of the editors that was used to crea"
  59.     "te some of the “^0” parts in this docume"
  60.     "nt is missing.  “^1” has been substitute"
  61.     "d."
  62. };
  63.  
  64.  
  65. //==============================================================================
  66. // Fictitious Null Viewer 'nmap'
  67. //==============================================================================
  68.  
  69.  
  70. resource kODNameMappings (kNullViewerPartHandlerNMAP) 
  71. {
  72.     kODViewer,
  73.     {    /* array Types: 1 elements */
  74.         /* [1] */
  75.         kNullViewerPartHandler,
  76.         kODIsAnISOString
  77.         {
  78.             kODViewer
  79.         }
  80.     }
  81. };
  82.  
  83.  
  84. //==============================================================================
  85. // NoPart Resources
  86. //==============================================================================
  87.  
  88.  
  89. include "NoPart.res" not 'ckid';
  90. // Icon suite kNoPartIconResID
  91. // Icon suite kNoPartButtonIconResID
  92. // PICT          kNoPartThumbnail
  93.  
  94.  
  95. //==============================================================================
  96. // NoPart nmaps
  97. //==============================================================================
  98.  
  99. // Map a part's kind (unique content identifier)
  100. // to a generic content category identifier
  101. //
  102. resource kODNameMappings (kKindCategoryMapId) {
  103.     kODKind,
  104.     {    /* array Types: 1 elements */
  105.         /* [1] */
  106.         kODViewerOfLastResortKind,
  107.         kODIsAnISOStringList
  108.         {
  109.             {    /* [1] */
  110.                 kODCategoryMissingEditorViewer
  111.             }
  112.         }
  113.     }
  114. };
  115.  
  116. // Map a part's class id (module::classname)
  117. // to a part's kind (unique content identifier)
  118. //
  119. resource kODNameMappings (kEditorKindMapId) {
  120.     kODEditorKinds,
  121.     {    /* array Types: 1 elements */
  122.         /* [1] */
  123.         kODBlackBoxHandlerOfLastResort, /* "Apple::NoPart" */
  124.         kODIsAnISOStringList
  125.         {
  126.             {    /* [1] */
  127.                 kODViewerOfLastResortKind
  128.             }
  129.         }
  130.     }
  131. };
  132.  
  133. // Map a part's class id (module::classname)
  134. // to the part editor's name
  135. //
  136. resource kODNameMappings (kEditorUserStringMapId) {
  137.     kODEditorUserString,
  138.     {    /* array Types: 1 elements */
  139.         /* [1] */
  140.         kODBlackBoxHandlerOfLastResort, /* "Apple::NoPart" */
  141.         kODIsINTLText
  142.         {
  143.             smRoman,
  144.             langEnglish,
  145.             "Apple Default"
  146.         }
  147.     }
  148. };
  149.  
  150. // Map a part's kind (unique content identifier)
  151. // to a human readable string.
  152. //
  153. resource kODNameMappings (kKindUserStringMapId) {
  154.     kODKindUserString,
  155.     {    /* array Types: 1 elements */
  156.         /* [1] */
  157.         kODViewerOfLastResortKind,
  158.         kODIsINTLText
  159.         {
  160.             smRoman,
  161.             langEnglish,
  162.             "- Cannot display -"
  163.         }
  164.     }
  165. };
  166.  
  167. //==============================================================================
  168. // NoPart Dialog Resources
  169. //==============================================================================
  170.  
  171. resource 'DLOG' (kNoPartDlogID, purgeable) {
  172.     {80, 80, 258, 462},
  173.     dBoxProc,
  174.     invisible,
  175.     noGoAway,
  176.     0,//refcon
  177.     kNoPartDlogID,
  178.     "",
  179.     alertPositionParentWindowScreen
  180. };
  181.  
  182. resource 'DITL' (kNoPartDlogID, purgeable) {
  183.     {
  184.         /* [1] */
  185.         {140, 279, 160, 353},
  186.         Button {
  187.             enabled,
  188.             "OK"
  189.         },
  190.         /* [2] */
  191.         {140, 175, 160, 259},
  192.         Button {
  193.             enabled,
  194.             "Translate…"
  195.         },
  196.         /* [3] */
  197.         {10, 70, 135, 362},
  198.         StaticText {
  199.             disabled,
  200.             "This gray box represents a part that could not be loaded.\n^0^2"
  201.         },
  202.         /* [4] */
  203.         {141, 70, 159, 127},
  204.         StaticText {
  205.             disabled,
  206.             "^3"
  207.         },
  208.         /* [5] */
  209.         {10, 20, 42, 52},
  210.         Icon {
  211.             disabled,
  212.             2
  213.         }
  214.     }
  215. };
  216.  
  217.  
  218. resource 'DLOG' (kNoPartRootDlogID, purgeable) {
  219.     {80, 80, 258, 462},
  220.     dBoxProc,
  221.     invisible,
  222.     noGoAway,
  223.     0,//refcon
  224.     kNoPartRootDlogID,
  225.     "",
  226.     alertPositionParentWindowScreen
  227. };
  228.  
  229. resource 'DITL' (kNoPartRootDlogID, purgeable) {
  230.     {
  231.         /* [1] */
  232.         {140, 279, 160, 353},
  233.         Button {
  234.             enabled,
  235.             "OK"
  236.         },
  237.         /* [2] */
  238.         {140, 175, 160, 259},
  239.         Button {
  240.             enabled,
  241.             "Translate…"
  242.         },
  243.         /* [3] */
  244.         {10, 70, 135, 362},
  245.         StaticText {
  246.             disabled,
  247.             "The document “^1” could not be opened. ^0^2"
  248.         },
  249.         /* [4] */
  250.         {141, 70, 159, 127},
  251.         StaticText {
  252.             disabled,
  253.             "^3"
  254.         },
  255.         /* [5] */
  256.         {10, 20, 42, 52},
  257.         Icon {
  258.             disabled,
  259.             0
  260.         }
  261.     }
  262. };
  263.  
  264.  
  265. //==============================================================================
  266. // NoPart Error Message Table
  267. //==============================================================================
  268.  
  269.  
  270. type 'errs' {
  271.     wide array {                                // Error list
  272.         LONGINT         whichList = 0,
  273.                     minErr = -2147483648;        // Low error number; 0 specifies STR#
  274.         LONGINT        maxErr = 2147483647;         // High error number
  275.         LONGINT;                                // Index in STR# of string
  276.     };
  277. };
  278.  
  279.  
  280. resource 'errs' (kNoPartMessageTableID,purgeable) {
  281.     {    whichList, 0, kNoPartMessageTableID;
  282.     
  283.         -1,                    -1,                    2;            // -1 denotes can't-find-editor (see NoPart.cpp)
  284.         -2,                    -2,                    3;            // -2 is same but if we know the editor name
  285.         -108,                -108,                4;
  286.         kODErrOutOfMemory,    kODErrOutOfMemory,    4;
  287.         -2802,                -2802,                5;            // fragSymbolNotFound
  288.         -2804,                -2804,                6;            // fragLibNotFound
  289.         -2807,                -2807,                5;            // fragHadUnresolveds
  290.         -2810,                -2809,                4;            // fragNoAddrSpace..fragNoMem
  291.         -2823,                -2823,                7;            // fragArchError
  292.         
  293.         -2899,                -2800,                8;            // all CFM errors
  294.         
  295. //        minErr,                maxErr,                1;            // all errors
  296.     };
  297. };
  298.  
  299.  
  300. resource 'STR#' (kNoPartMessageTableID,purgeable) {
  301.     {
  302.         /*1*/"Could not load this “^1” part: ^2";                // Generic; loaded directly
  303.         /*2*/"No editor could be found to edit this part’s content.";
  304.         /*3*/"The editor “^1” is not installed, and no installed editor can edit this part’s content.";
  305.         /*4*/"There was not enough memory available to load this part. Try closing other applications or documents.";
  306.         /*5*/"Could not load the editor “^1” due to a missing symbol “^2”. Try re-installing the editor.";
  307.         /*6*/"Could not load the editor “^1” due to a missing library “^2”. Try re-installing the editor.";
  308.         /*7*/"The editor “^1” cannot run on this type of CPU. Try re-installing the editor.";
  309.         /*8*/"Could not load the editor “^1” due to a shared-library error of type ^3. Try re-installing it.";
  310.     };
  311. };
  312.  
  313.  
  314. resource 'STR#' (kNoPartTranslationStrID,purgeable) {
  315.     {
  316.         "\nNo translations are available for this data.",
  317.         "The data can, however, be translated into a format readable by an installed editor."
  318.     };
  319. };
  320.